import Vue from 'vue'
import Router from 'vue-router'
import displayStu from '../components/display/displayStu'
import displayTec from '../components/display/displayTec'
import displayCor from '../components/display/displayCor'
import displayGG from "../components/display/displayGG";
import login from '../components/login/login'
import index from '../components/index/index'
import popover from "../components/test/popover";
import chatStu from "../components/chat/chatStu";
import approveSelectCor from "../components/admin/approveSelectCor";
import indexStu from "../components/index/indexStu";
import selectCor from "../components/student/selectCor";
import stuCorMes from "../components/student/stuCorMes";
import tecCenter from "../components/student/tecCenter";
import indexTec from "../components/index/indexTec"
import myClass from "../components/student/myClass";
import recCor from "../components/student/recCor";
import myCorTec from "../components/teacher/myCorTec";
import approveTecCor from "../components/admin/approveTecCor";
import tecMesCenter from "../components/teacher/tecMesCenter";
import recommandCor from "../components/student/recommandCor";
import displayEchart from "../components/display/displayEchart";
import echarts from "../components/display/echarts"
import chatAdmin from "../components/chat/chatAdmin";
import mesCenter from "../components/admin/mesCenter";
import chatTec from "../components/chat/chatTec";

const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}


/* 引入element */
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

/* 使用ElementUI */
Vue.use(ElementUI)
Vue.config.productionTip = false

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/mesCenter',
          name:"mesCenter",
          component:mesCenter
        },
      ]
    },

    {
      path:'/chatTec',
      name:"chatTec",
      component:chatTec
    },


    {
      path:'/chatAdmin',
      name:"chatAdmin",
      component:chatAdmin
    },


    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/displayEchart',
          name:"displayEchart",
          component:displayEchart
        },
      ]
    },



    {
      path:'/echarts',
      name:"echarts",
      component:echarts
    },


    {
      path:'/indexStu',
      name:"indexStu",
      component:indexStu,
      children:[
        {
          path:'/recommandCor',
          name:"recommandCor",
          component:recommandCor
        },
      ]
    },


    {
      path:'/indexTec',
      name:"indexTec",
      component:indexTec,
      children:[
        {
          path:'/tecMesCenter',
          name:"tecMesCenter",
          component:tecMesCenter
        },
      ]
    },


    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/approveTecCor',
          name:"approveTecCor",
          component:approveTecCor
        },
      ]
    },
    {
      path:'/indexTec',
      name:"indexTec",
      component:indexTec,
      children:[
        {
          path:'/myCorTec',
          name:"myCorTec",
          component:myCorTec
        },
      ]
    },
    {
      path:'/indexStu',
      name:"indexStu",
      component:indexStu,
      children:[
        {
          path:'/recCor',
          name:"recCor",
          component:recCor
        },
      ]
    },
    {
      path:'/indexStu',
      name:"indexStu",
      component:indexStu,
      children:[
        {
          path:'/myClass',
          name:"myClass",
          component:myClass
        },
      ]
    },
    {
      path:'/indexStu',
      name:"indexStu",
      component:indexStu,
      children:[
        {
          path:'/tecCenter',
          name:"tecCenter",
          component:tecCenter
        },
      ]
    },

    {
      path:'/indexStu',
      name:"indexStu",
      component:indexStu,
      children:[
        {
          path:'/stuCorMes',
          name:"stuCorMes",
          component:stuCorMes
        },
      ]
    },

    {
      path: '/indexStu',
      name: 'indexStu',
      component: indexStu
    },

    {
      path:'/indexStu',
      name:"indexStu",
      component:indexStu,
      children:[
        {
          path:'/selectCor',
          name:"selectCor",
          component:selectCor
        },
      ]
    },


    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/approveSelectCor',
          name:"approveSelectCor",
          component:approveSelectCor
        },
      ]
    },


    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/displayGG',
          name:"displayGG",
          component:displayGG
        },
      ]
    },

    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/displayCor',
          name:"displayCor",
          component:displayCor
        },
      ]
    },

    {
      path:'/indexTec',
      name:"indexTec",
      component:indexTec
    },

    {
      path:'/chatStu',
      name:"chatStu",
      component:chatStu
    },

    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/index',
      name: 'index',
      component: index
    },

    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/displayTec',
          name:"displayTec",
          component:displayTec
        },
      ]
    },


    {
      path:'/displayCor',
      name:"displayCor",
      component:displayCor
    },


    {
      path:'/index',
      name:"index",
      component:index,
      children:[
        {
          path:'/displayStu',
          name:"displayStu",
          component:displayStu
        },
  ]
    },


    {
      path:'/popover',
      name:"popover",
      component:popover
    }

  ]
})
